home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c++,comp.lang.c,comp.os.ms-windows.programmer.misc
- Subject: Re: fastest code
- Date: Fri, 12 Apr 96 23:42:15 GMT
- Organization: none
- Message-ID: <829352535snz@genesis.demon.co.uk>
- References: <316112A2.7D37@public.sta.net.cn> <4kgu7g$n9a@solutions.solon.com> <4kh2p7INNkcq@keats.ugrad.cs.ubc.ca> <4kjdus$fiq@samba.rahul.net> <4kjpn0INN817@keats.ugrad.cs.ubc.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4kjpn0INN817@keats.ugrad.cs.ubc.ca>
- c2a192@ugrad.cs.ubc.ca "Kazimir Kylheku" writes:
-
- >In article <4kjdus$fiq@samba.rahul.net>,
- >Oliver Hellwig <hellwig@rahul.net> wrote:
- > >Well it did! I did not turn on full optimizations but I just used the
- > >compiler in it's default mode. However, when I turned off all optimizations
- > >then it compiled correctly. I verified that it left the loop but removed
- >
- >Ah well. What can be said? Don't use Watcom to compile Linux drivers or any
- >other portion. Use a freeware compiler that works.
-
- Not to mention that the gcc version of that compiled code, in addition to
- working, looks better optimised. What I did find curious was that on
- the compilers I tried:
-
- prom[i] = prom[i+i];
-
- produces different code to:
-
- prom[i] = prom[2*i];
-
- where the code for the latter certainly looks more efficient (although
- it is difficult to guess the exact instruction timings). I wonder if
- Watcom compiles the 2nd version correctly.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-